package ProjetCorba;

/**
 * Interface definition : GestionLivraison
 * 
 * @author OpenORB Compiler
 */
public abstract class GestionLivraisonPOA extends org.omg.PortableServer.Servant
        implements GestionLivraisonOperations, org.omg.CORBA.portable.InvokeHandler
{
    public GestionLivraison _this()
    {
        return GestionLivraisonHelper.narrow(_this_object());
    }

    public GestionLivraison _this(org.omg.CORBA.ORB orb)
    {
        return GestionLivraisonHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:ProjetCorba/GestionLivraison:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        if (opName.equals("creerColis")) {
                return _invoke_creerColis(_is, handler);
        } else if (opName.equals("depotColisPourRetrait")) {
                return _invoke_depotColisPourRetrait(_is, handler);
        } else if (opName.equals("depotColisPourTransport")) {
                return _invoke_depotColisPourTransport(_is, handler);
        } else if (opName.equals("getStatusColis")) {
                return _invoke_getStatusColis(_is, handler);
        } else if (opName.equals("retraitColis")) {
                return _invoke_retraitColis(_is, handler);
        } else if (opName.equals("retraitColisPourTransport")) {
                return _invoke_retraitColisPourTransport(_is, handler);
        } else {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke_creerColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();
        short arg1_in = _is.read_short();
        short arg2_in = _is.read_short();
        short arg3_in = _is.read_short();
        short arg4_in = _is.read_short();

        String _arg_result = creerColis(arg0_in, arg1_in, arg2_in, arg3_in, arg4_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_depotColisPourTransport(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        depotColisPourTransport(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_depotColisPourRetrait(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        depotColisPourRetrait(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_retraitColisPourTransport(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        retraitColisPourTransport(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_retraitColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        retraitColis(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getStatusColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        String _arg_result = getStatusColis(arg0_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

}
